<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib tagdir="/WEB-INF/tags/" prefix="jhtag"%>
<!DOCTYPE html >
<html>
<head>
<title>Job Hunter - contact</title>
</head>
<body>

	<div id="breadcrumb">
		<a href="/main" >accueil</a> >
		<a href="/contactsList" >contact</a>
		 > contact
	</div>
	<article>
		<h1>${contact.firstName } ${contact.lastName }</h1>
		<div>company : ${contact.company.name }
			<a href="company?id=${contact.company.id }&contactId=${contact.id}"><%@ include file="/img/seeB.svg"%></a>					
			<a href="updCompany?id=${contact.company.id}&contactId=${contact.id}"><%@ include file="/img/updB.svg"%></a> 
		</div>
		<div>function : ${contact.function }</div>
		<div>phone : ${contact.phone }</div>
		<div>email : ${contact.email }</div>
		<div>description : ${contact.description }</div>
	</article>

	<article class="article12">
		<h1>Actions</h1><a href="addAction?contId=${contact.id}"><%@ include file="/img/addB.svg"%></a>
		<table class="dataTable display compact" >
			<thead>
				<tr>
					<th>ID</th>
					<th>processus</th>
					<th>nom</th>
					<th>date</th>
					<th>état</th>
					<th>description</th>
					<th>type </th>
					<th>personne de contact</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${contact.actions}" var="action">
					<tr>
						<td>${action.id }</td>
						<td>${action.process.name }</td>
						<td>${action.name }</td>
						<td>${action.actionDateString }</td>
						<td>${action.state.description }</td>
						<td><jhtag:substring value="${action.description}" size="60"/></td>
						<td>
							${action.communicationType.description }
							- ${action.actionType.description }
						</td>
						<td>${action.contact.firstName } ${action.contact.lastName }</td>
						<td><a href="action?id=${action.id }"><%@ include file="/img/seeB.svg"%></a> <a
							href="updAction?id=${action.id }&contId=${contact.id}"><%@ include file="/img/updB.svg"%></a> <a
							href="delAction?id=${action.id }&contId=${contact.id}"><%@ include file="/img/delB.svg"%></a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		
	</article>
</body>
</html>